#include <sys/ipc.h>
#include <sys/msg.h>
#include <stdio.h>


int main(){
    key_t key = ftok(".", 1);
    int qid = msgget(key, IPC_CREAT | 0666);

    long type = 0;
    msgrcv(qid, &type, 0, 0, 0);
    printf("%ld\n", type);
    msgrcv(qid, &type, 0, 0, 0);
    printf("%ld\n", type);

    return 0;
}